package com.uyayo.notepad.service;

import com.uyayo.framework.common.exception.ParentNotFoundException;
import com.uyayo.framework.core.service.IBaseService;
import com.uyayo.notepad.entity.FavoriteCategory;
import com.uyayo.notepad.model.FavoriteCategoryCondition;

import java.util.List;

public interface FavoriteCategoryService extends IBaseService<FavoriteCategory>{

	List<FavoriteCategory> selectFavoriteCategory(FavoriteCategoryCondition favoriteCategoryCondition);

	/**
	 * 根据上级Id获取记录数
	 * @param parentId 上级id
	 * @return int
	 */
	int selectCountByParentId(Long parentId);

	int saveFavoriteCategory(FavoriteCategory favoriteCategory) throws ParentNotFoundException;

	int updateFavoriteCategory(FavoriteCategory favoriteCategory) throws ParentNotFoundException;

	int deleteFavoriteCategory(Long id);
}
